-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(layertreeview): add checks on selectedModel to avoid segfault #59337
fix(layertreeview): add checks on selectedModel to avoid segfault #59337
Conversation
🪟 Windows buildsDownload Windows builds of this PR for testing. 🪟 Windows Qt6 buildsDownload Windows Qt6 builds of this PR for testing. |
PyQgsLayerTreeView crashes on QT6 https://github.com/qgis/QGIS/actions/runs/11690407551/job/32556700307?pr=59337 |
@nyalldawson @rouault do you have an idea why the Qt6 test has a segfault? I can run the test in both Qt5 and Qt6 on my machine and it is fine... Is seems as if the Qt6 test uses the code without my modifications... |
did you try running under Valgrind, just in case this might be something subtle... Or maybe it is due to a difference of Qt6 versions between your machine and the CI one ? |
@Djedouas looks like the test is actually hanging and timing out and being forcefully closed. But I can't see anything here that would lead to a hang... 🤔 I'd check if it's the new test causing this (as opposed to an existing test impacted by these changes) by temporarily removing it... |
The QGIS project highly values your contribution and would love to see this work merged! Unfortunately this PR has not had any activity in the last 14 days and is being automatically marked as "stale". If you think this pull request should be merged, please check
|
8aecbdd
to
c2d81ec
Compare
check calls to layerTreeModel(), selectedModel(), and use of mProxyModel
c2d81ec
to
6961b8c
Compare
@nyalldawson @rouault Fixed the test by adding more checks on potentially nullptr:
|
The backport to
stderr
stdout
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-queued_ltr_backports queued_ltr_backports
# Navigate to the new working tree
cd .worktrees/backport-queued_ltr_backports
# Create a new branch
git switch --create backport-59337-to-queued_ltr_backports
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick 6961b8cbc61bd59e27f09bd8c8fb57eefb9cad9d
# Push it to GitHub
git push --set-upstream origin backport-59337-to-queued_ltr_backports
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-queued_ltr_backports Then, create a pull request where the |
The backport to
stderr
stdout
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-release-3_34 release-3_34
# Navigate to the new working tree
cd .worktrees/backport-release-3_34
# Create a new branch
git switch --create backport-59337-to-release-3_34
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick 6961b8cbc61bd59e27f09bd8c8fb57eefb9cad9d
# Push it to GitHub
git push --set-upstream origin backport-59337-to-release-3_34
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-release-3_34 Then, create a pull request where the |
Description
Fixes #59329
QGIS crashes when executing this line (and other from the same family) in the Python console: